/**
 * Project pro_con
 * @author lwj
 */


#include "Producer.h"
#include "ProductQueue.h"
#include <ctime>
#include <iostream>
using std::endl;
using std::cout;
/**
 * Producer implementation
 */


Producer::~Producer() {

}

Producer::Producer() {
}

/**
 * @param que
 */
void Producer::produce(ProductQueue & que) {
    srand(time(NULL));
    for(int i = 0; i < 20; i++)
    {
        int temp = rand()%20;
        cout << "------------" << "size = " << que.getSize() << "  produce: " << temp << endl;
        que.push(temp);
    }

}
